//
//  InvestmentBasicParameter.h
//  DataCollector
//
//  Created by jiro on 12/07/02.
//  Copyright 2012 jiro music. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "../Commons.h"
#import "StrategyParameterSet.h"

class FxInvestmentBasicParameterSet : public StrategyParameterSet
{
public:

	enum ParameterId
	{
		Id_CurrencyCode,
		Id_TargetCurrencyCode,
		Id_InvestMoney,
		Id_TargetInterestArg,
		Id_TolerenctLossRateArg,
		Id_LeverageArg,
		Id_EntryExchangeArg,
		Id_TargetSettlementExchangeRateGapArg,
		Id_LossCutExchangeRateGapArg,
		Id_SpreadArg,
		Id_ChargeArg,
		Id_TradeCountArg,
		Id_InvestmentPositionTypeArg,
		Id_Count,
	};

public:

	static int parameterCount();

	FxInvestmentBasicParameterSet( const FxInvestmentBasicParameterSet& p );
	
	FxInvestmentBasicParameterSet( const std::vector< const char* >& values );

	FxInvestmentBasicParameterSet(
		NSString* currencyCode,
		NSString* targetCurrencyCode,
		double investMoneyArg,
		double targetInterestArg,
		double tolerenctLossRateArg,
		double leverageArg,
		double entryExchangeArg,
		double targetSettlementExchangeRateGapArg,
		double lossCutExchangeRateGapArg,
		double spreadArg,
		double chargeArg,
		int tradeCountArg,
		InvestmentPosition::Type investmentPositionTypeArg
	);

	virtual ~FxInvestmentBasicParameterSet();

	NSString* queryInsert() const;
	NSString* queryInsertValue() const;
	NSString* queryInsertWithSerialValue() const;
	NSString* queryInsertValueWithSerialValue() const;

	NSString* getCurrencyCode() const;
	NSString* getTargetCurrencyCode() const;
	double getInvestMoney() const;
	double getTargetInterest() const;
	double getTolerenctLossRate() const;
	double getLeverage() const;
	double getEntryExchange() const;
	double getTargetSettlementExchangeRateGap() const;
	double getLossCutExchangeRateGap() const;
	double getSpread() const;
	double getCharge() const;
	int getTradeCount() const;
	InvestmentPosition::Type getInvestmentPositionType() const;

	void setCurrencyCode( NSString* code );
	void setTargetCurrencyCode( NSString* code );
	void setInvestMoney( double money );
	void setTargetInterest( double interest );
	void setTolerenctLossRate( double rate );
	void setLeverage( double leverage );
	void setEntryExchange( double exchange );
	void setTargetSettlementExchangeRateGap( double gap );
	void setLossCutExchangeRateGap( double gap );
	void setSpread( double spread );
	void setCharge( double charge );
	void setTradeCount( int count );
	void setInvestmentPositionType( InvestmentPosition::Type type );

	double getMinimumTargetSettlementExchangeGap() const;
	double getMaximumLossCutExchangeGap() const;
	double getProfitPerTradeAtTargetExchange() const;
	double getLossPerTradeAtLossCutExchange() const;
	double getBreakEvenWinRate() const;
	double getTargetWinRate() const;

};
